
const Users_model = require("./my_models/Users_model")
const mongoose = require("mongoose");
const data_url = "mongodb://127.0.0.1:27017/zxh";//定义数据库地址

mongoose.connection.on("connected", () => {
    console.log("连接成功")
})
mongoose.connection.on("error", () => {
    console.log("连接失败")
})
mongoose.connection.on("disconnected", () => {
    console.log("断开连接")
})

mongoose.connect(data_url)

exports.db = {
    Users_model
}